﻿@model Bricks.Site.Models.StatisticsItemMaintenanceView
@{
    ViewBag.Title = "GetStatisticsItemMaintenance";
    Layout = "~/Views/Shared/_UserPage.cshtml";
}
<script type="text/javascript">
    var EditStatisticsItemMaintenance = {
        CheckedChange: function (checkBox)
        {
            if (checkBox.checked) {
                $('#PID').combobox('disable');
                $('#EngineeringUnit').attr("disabled", true);
                $('#MoneyUnit').combobox('disable');

                var data = $("#PID").combobox('getData');
                $("#MoneyUnit").combobox('select', data[0]['ID']);
                $('#EngineeringUnit').val('');
                $("#MoneyUnit").combobox('select', '');
            }
            else {
                $('#PID').combobox('enable');
                $('#EngineeringUnit').attr("disabled", false);
                $('#MoneyUnit').combobox('enable');
            }
        }
    }
</script>

<div class="frombox datagrid-body" style="padding-bottom: 5px;">
    <form id="frmStatisticsItemMaintenance" method="post">
        <input type="hidden" id="hID" name="ID" value="@Model.ID" />
        <table class="datagrid-btable" border="0" cellspacing="0" cellpadding="0">
            <tr class="datagrid-row">
                <td class="th">
                    <div class="datagrid-cell">项目名称</div>
                </td>
                <td class="td" colspan="5">
                    <div class="datagrid-cell">
                        <input name="StatisticsItemName" class="easyui-textbox" value="@Model.StatisticsItemName" />
                    </div>
                </td>
            </tr>
            <tr class="datagrid-row">
                <td class="th">
                    <div class="datagrid-cell">是否父项</div>
                </td>
                <td class="td">
                    <div class="datagrid-cell">
                        @*<input id="IsParent" name="IsParent" type="checkbox" checked="@Model.IsParent" onchange="EditStatisticsItemMaintenance.CheckedChange(this);" />*@
                        @Html.CheckBoxFor(m => m.IsParent, new { onchange = "EditStatisticsItemMaintenance.CheckedChange(this);" })
                    </div>
                </td>
            </tr>
            <tr class="datagrid-row">
                <td class="th">
                    <div class="datagrid-cell">所属父级</div>
                </td>
                <td class="td">
                    <div class="datagrid-cell">
                        <input id="PID" name="PID" class="easyui-combobox" value="@Model.PID" />
                    </div>
                </td>
            </tr>
            <tr class="datagrid-row">
                <td class="th">
                    <div class="datagrid-cell">工程量单位</div>
                </td>
                <td class="td">
                    <div class="datagrid-cell">
                        <input id="EngineeringUnit" name="EngineeringUnit" class="easyui-textbox" value="@Model.EngineeringUnit" />
                    </div>
                </td>
            </tr>
            <tr class="datagrid-row">
                <td class="th">
                    <div class="datagrid-cell">金额单位</div>
                </td>
                <td class="td">
                    <div class="datagrid-cell">
                        @*<input id="MoneyUnit" name="MoneyUnit" class="easyui-textbox" value="@Model.MoneyUnit" />*@
                        <input id="MoneyUnit" name="MoneyUnit" class="easyui-combobox" value="@Model.MoneyUnit" />
                    </div>
                </td>
            </tr>
        </table>
        <input id="hID" name="ID" type="hidden" value="@Model.ID" />
        <input id="hProjectID" name="ProjectID" type="hidden" value="@Model.ProjectID" />
        <input id="hContractType" name="ContractType" type="hidden" value="@Model.ContractType" />
    </form>
</div>

